class Solution {
public:
    int minArray(vector<int>& numbers) {
        int n = numbers.size();
        int l = 0;
        int r = n-1;
        while(l <= r){
            int m = (l+r) / 2;
            if(numbers[r] > numbers[m]){
                r = m;
            }else if(numbers[r] < numbers[m]){
                l = m+1;
            }else{
                r--;
            }
        }
        return numbers[l];
    }
};
